<?php
/**
 * @Author: Marte
 * @Date:   2017-08-14 08:01:28
 * @Last Modified by:   Marte
 * @Last Modified time: 2017-08-17 20:23:11
 */

$username=$_SESSION['username'];

$sql0='select * from follow where active="'.$username.'"';
$_result=$_mysql->query($sql0);



?>
<span class="follow_title">我的关注</span>
<div class="follow_main">
        <span class="follow_s_title">我关注的书友</span><span class="follow_add"><a href="person.php?change=4" title=""><img src="images/jiahao.png" alt="">添加</a></span>
        <ul class="start">
        <?php
            while($_assoc=$_result->fetch_assoc()){
                 $passive_username=$_assoc['passive'];//得到被关注的人的username
                 $sql00='select * from userregisters where username="'.$passive_username.'"';
                 $_result0=$_mysql->query($sql00);
                 $_assoc0=$_result0->fetch_assoc();
        ?>
            <li>
            <i><img src="<?php echo $_assoc0['headicon']?>" alt=""></i>
        <div class="friend_main_right">
                <span class="username"><?php echo $_assoc0['nickname']?></span><em><img src="images/isgui.png" alt=""></em>
                <p><?php echo $_assoc0['introduce']?></p>

                <span class="bottom_s label"><?php echo $_assoc0['rank']?></span>
                <span class="bottom_s not_label1"><a href="" name="message" title="<?php echo $_assoc0['id'] ?>">评论</a></span>
                <span class="bottom_s not_label2"><a href="" title="">点赞</a></span>
           </span>
            </div>
            <div class="clear">

            </div>
            </li>

            <?php
                }
            ?>

        </ul>
</div>


